//
//  CZQCourseTypHeadView.m
//  coachmanage
//
//  Created by 众拳科技 on 2018/3/19.
//  Copyright © 2018年 众拳科技. All rights reserved.
//

#import "CZQCourseTypHeadView.h"

@implementation CZQCourseTypHeadView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        /**
         模板名字
         */
        CommonInputView *nameView = [[CommonInputView alloc] init];
        nameView.titleLabel.text = @"模板名称";
        nameView.titleTF.placeholder = @"请输入模板名称";
        [self addSubview:nameView];
        self.nameInputView = nameView;
        
        /**
         模板类型
         */
        CommonInputView *typeView = [[CommonInputView alloc] init];
        typeView.titleLabel.text = @"模板类型";
        typeView.titleTF.placeholder = @"模板类型";
        [self addSubview:typeView];
        self.typeInputView = typeView;
        
        [self setConstraints];
        
    }
    return self;
}

#pragma mark 设置约束
-(void)setConstraints{
    
    [self.nameInputView mas_remakeConstraints:^(MASConstraintMaker *make) {
        
        make.top.left.with.mas_equalTo(self);
        
        
    }];
    
    [self.typeInputView mas_remakeConstraints:^(MASConstraintMaker *make) {
        
        make.top.mas_equalTo(self.nameInputView.mas_bottom);
        
        make.left.width.bottom.mas_equalTo(self);
        
    }];
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
